<template>
  <div>
      <ul>
          <li v-for="i in worklist" :key="i">{{i.name}}-------------- <button @click="next(i.id)">进入</button></li>
      </ul>
  </div>
</template>

<script>
import axios from '../../http/axios'
export default {
data () {
    return {
    worklist:[]    
    }
},
methods: {
    get_work(){
        axios('/work','get').then(res=>{
            console.log(res);
            this.worklist=res.list
        })
    },
    next(id){
        this.$router.push({path:'/xuan',query:{'id':id}})
    }
},
mounted () {
    this.get_work()
}
}
</script>

<style>

</style>